Optimal. Leaf size=32 \[ a B x+\frac {a (B+C) \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a C \tan (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.139, Rules used = {4157, 3999,
3852, 8, 3855} \begin {gather*} \frac {a (B+C) \tanh ^{-1}(\sin (c+d x))}{d}+a B x+\frac {a C \tan (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 3999
Rule 4157
Rubi steps
\begin {align*} \int \cos (c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\int (a+a \sec (c+d x)) (B+C \sec (c+d x)) \, dx\\ &=a B x+(a C) \int \sec ^2(c+d x) \, dx+(a (B+C)) \int \sec (c+d x) \, dx\\ &=a B x+\frac {a (B+C) \tanh ^{-1}(\sin (c+d x))}{d}-\frac {(a C) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}\\ &=a B x+\frac {a (B+C) \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a C \tan (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 43, normalized size = 1.34 \begin {gather*} a B x+\frac {a B \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a C \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a C \tan (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.76, size = 57, normalized size = 1.78
method | result | size |
derivativedivides | \(\frac {B a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+a C \tan \left (d x +c \right )+B a \left (d x +c \right )+a C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(57\) |
default | \(\frac {B a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+a C \tan \left (d x +c \right )+B a \left (d x +c \right )+a C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(57\) |
risch | \(a B x +\frac {2 i a C}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}\) | \(105\) |
norman | \(\frac {a B x +a B x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-a B x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-a B x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {2 a C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 a C \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {a \left (B +C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {a \left (B +C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(160\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 73 vs.
\(2 (32) = 64\).
time = 0.27, size = 73, normalized size = 2.28 \begin {gather*} \frac {2 \, {\left (d x + c\right )} B a + B a {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + C a {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, C a \tan \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 79 vs.
\(2 (32) = 64\).
time = 3.46, size = 79, normalized size = 2.47 \begin {gather*} \frac {2 \, B a d x \cos \left (d x + c\right ) + {\left (B + C\right )} a \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (B + C\right )} a \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, C a \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int B \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int B \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int C \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int C \cos {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 84 vs.
\(2 (32) = 64\).
time = 0.48, size = 84, normalized size = 2.62 \begin {gather*} \frac {{\left (d x + c\right )} B a + {\left (B a + C a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (B a + C a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.00, size = 100, normalized size = 3.12 \begin {gather*} \frac {C\,a\,\mathrm {tan}\left (c+d\,x\right )}{d}+\frac {2\,B\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________